package com.anhry.www.safety.manage.oa.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.anhry.www.safety.manage.system.bean.TbUser;

/**
 * 
 * @author chen
 * @date 2012-8-20
 */
@Entity
@Table(name="TB_OA_PERSON_CALL")
@SequenceGenerator(name="TB_OA_PERSON_CALL_SEQ", sequenceName="TB_OA_PERSON_CALL_SEQ_DB", allocationSize=1)
public class TbOaPersonCall implements java.io.Serializable {

	// Fields

	private Long id;

	private Date callTime;

	private String callContent;

	private String callType;

	private String callAddsUser;

	private String callAddsUsernames;

	private String callNums;

	private String callAtTime;

	// private String callUser;
	private TbUser tbUser;

	private Date callDate;

	private String isDele;

	private String version;

	private String noteDay;

	private String noteHour;

	private String noteSec;

	private String isSend;

	private String callAddsCorp;

	private String callAddsCorpnames;

	private String isDrop;

	private String isCorper;

	private String callYear;

	private String callQuarter;

	private String callMonth;

	// Constructors

	/** default constructor */
	public TbOaPersonCall() {
	}

	/** full constructor */
	public TbOaPersonCall(Date callTime, String callContent, String noteDay,
			String isSend, String isDrop, String callType, String callAddsUser,
			String callAddsUsernames, String noteHour, String callAddsCorp,
			String isCorper, String callNums, String callAtTime, TbUser tbUser,
			Date callDate, String noteSec, String callAddsCorpnames,
			String isDele, String version) {
		this.callTime = callTime;
		this.callContent = callContent;
		this.callType = callType;
		this.callAddsUser = callAddsUser;
		this.callAddsUsernames = callAddsUsernames;
		this.callNums = callNums;
		this.callAtTime = callAtTime;
		this.tbUser = tbUser;
		this.callDate = callDate;
		this.isDele = isDele;
		this.version = version;
		this.noteDay = noteDay;
		this.noteHour = noteHour;
		this.noteSec = noteSec;
		this.isSend = isSend;
		this.callAddsCorp = callAddsCorp;
		this.callAddsCorpnames = callAddsCorpnames;
		this.isDrop = isDrop;
		this.isCorper = isCorper;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_OA_PERSON_CALL_SEQ")
	@Column(name = "ID", precision = 11, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="CALL_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCallTime() {
		return this.callTime;
	}

	public void setCallTime(Date callTime) {
		this.callTime = callTime;
	}

	@Column(name="CALL_CONTENT",length=2000)
	public String getCallContent() {
		return this.callContent;
	}

	public void setCallContent(String callContent) {
		this.callContent = callContent;
	}

	@Column(name="CALL_TYPE",length=1)
	public String getCallType() {
		return this.callType;
	}

	public void setCallType(String callType) {
		this.callType = callType;
	}

	@Column(name="CALL_ADDS_USER",length=4000)
	public String getCallAddsUser() {
		return this.callAddsUser;
	}

	public void setCallAddsUser(String callAddsUser) {
		this.callAddsUser = callAddsUser;
	}

	@Column(name="CALL_ADDS_USERNAMES",length=1)
	public String getCallAddsUsernames() {
		return this.callAddsUsernames;
	}

	public void setCallAddsUsernames(String callAddsUsernames) {
		this.callAddsUsernames = callAddsUsernames;
	}

	@Column(name="CALL_NUMS",length=10)
	public String getCallNums() {
		return this.callNums;
	}

	public void setCallNums(String callNums) {
		this.callNums = callNums;
	}

	@Column(name="CALL_AT_TIME",length=10)
	public String getCallAtTime() {
		return this.callAtTime;
	}

	public void setCallAtTime(String callAtTime) {
		this.callAtTime = callAtTime;
	}
	
	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(name="CALL_USER")
	public TbUser getTbUser() {
		return tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Column(name="CALL_DATE")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCallDate() {
		return this.callDate;
	}

	public void setCallDate(Date callDate) {
		this.callDate = callDate;
	}

	@Column(name="IS_DELE",length=1)
	public String getIsDele() {
		return this.isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}

	@Column(name="VERSION",length=10)
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	@Column(name="NOTE_DAY",length=10)
	public String getNoteDay() {
		return noteDay;
	}

	public void setNoteDay(String noteDay) {
		this.noteDay = noteDay;
	}

	@Column(name="NOTE_HOUR",length=10)
	public String getNoteHour() {
		return noteHour;
	}

	public void setNoteHour(String noteHour) {
		this.noteHour = noteHour;
	}

	@Column(name="NOTE_SEC",length=10)
	public String getNoteSec() {
		return noteSec;
	}

	public void setNoteSec(String noteSec) {
		this.noteSec = noteSec;
	}

	@Column(name="IS_SEND",length=10)
	public String getIsSend() {
		return isSend;
	}

	public void setIsSend(String isSend) {
		this.isSend = isSend;
	}

	@Column(name="CALL_ADDS_CORP",length=10)
	public String getCallAddsCorp() {
		return callAddsCorp;
	}

	public void setCallAddsCorp(String callAddsCorp) {
		this.callAddsCorp = callAddsCorp;
	}

	@Column(name="CALL_ADDS_CORPNAMES")
	public String getCallAddsCorpnames() {
		return callAddsCorpnames;
	}

	public void setCallAddsCorpnames(String callAddsCorpnames) {
		this.callAddsCorpnames = callAddsCorpnames;
	}

	@Column(name="IS_DROP",length=1)
	public String getIsDrop() {
		return isDrop;
	}

	public void setIsDrop(String isDrop) {
		this.isDrop = isDrop;
	}

	@Column(name="IS_CORPER",length=1)
	public String getIsCorper() {
		return isCorper;
	}

	public void setIsCorper(String isCorper) {
		this.isCorper = isCorper;
	}

	@Column(name="CALL_MONTH",length=10)
	public String getCallMonth() {
		return callMonth;
	}

	public void setCallMonth(String callMonth) {
		this.callMonth = callMonth;
	}

	@Column(name="CALL_QUARTER",length=10)
	public String getCallQuarter() {
		return callQuarter;
	}

	public void setCallQuarter(String callQuarter) {
		this.callQuarter = callQuarter;
	}

	@Column(name="CALL_YEAR",length=10)
	public String getCallYear() {
		return callYear;
	}

	public void setCallYear(String callYear) {
		this.callYear = callYear;
	}

}